home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-09-27 | 2.2 KB | 58 lines | [TEXT/KAHL] |
-
-
- CPictureButton - For the TCL by Thomas J. Vilot.
-
- CPictureButton is a subclass of CPicture. It is useful if you desire a nice
- pict-based, 3-D button. It correctly handles updating your picture button when the
- button is pressed, activated, and deactivated. You can use it much as you would a
- conventional button, specifying a command that it will submit to itsSupervisor.
-
- All you need to do is specify it much as you would a CPicture:
-
- void CPictureButton::IPictureButton( CView *anEnclosure, CBureaucrat *aSupervisor,
- short aHEncl, short aVEncl,short width, short height,
- SizingOption aHSizing, SizingOption aVSizing,
- short enabledID, short disabled, short pressed)
-
- where enabledID is the PICT_ID of the picture button when it is active, disabled is
- the PICT_ID of the disabled picture resource, and pressed is the PICT_ID to use when
- the picture button is being pressed (tracked).
-
- You will, of course, need to create your own PICT resources to suit your needs.
-
- To use it, you must be running the TCL. The object uses Object I/O for saving
- and restoring its instance variables to and from a stream, but you do not need
- Object I/O in order to use it. You can simply remove those two methods.
-
- If you are interested in Object I/O, you can contact them at:
- Object Factory, Incorporated
- 14350 92nd Ave. N.
- Maple Grove, MN 55369
- 612.420.9876
-
- or on America Online, objectFactory.
-
- I will be subclassing this later to utilize toggled picture buttons, or you can
- be apropriately adventurous yourself. Another nice variant would be a CPictureButton
- that allows you to send it a string for its name, much like a conventional button.
-
- Missing from this object:
-
- What do we do if the monitor is set to one-bit? Currently, we still use the
- picts that were defined by the user. We should really have another set of PICT
- resource IDs that are called if the monitor can not display grayscale.
-
-
-
-
- CPictureButton is not System 7 dependent, but is System 7 friendly.
-
-
-
- This code is freeware...use it to your hearts content, or utilize that nifty trashcan
- icon on that thar desktop of yours......
-
- Comments or suggestions?
- CompuServe: Thomas J. Vilot, 70740,1674
- AOL: TJVilot
- InterNet: VILOT@BIGBOY.CIS.TEMPLE.EDU